How to export more than 500 rows in Google Analytics
It has been a long standing issue that it is not altogether apparent how you export more than 500 rows of data from Google Analytics.
The common method that people including ourselves was to alter the query parameters in the URL to visually display a greater number of results before clicking to export. The trouble here is if your browser has a number of tabs open and you try to display 10,000 results the you risk crashing the browser. This method is outlined in Google’s help page titled ‘Exporting and Emailing Reports’.
Please note that if you apply any advanced segments or alter the standard report past date this will still just export the original report.
Step 1 – Create Bookmark
- Create a new bookmark in your Browser;
- If you have your Bookmarks bar visible then you can probably right-click whilst hovering your mouse over the bar to bring up a menu allowing you to create a new bookmark.
- Name your bookmark something you’ll remember;
- Copy the code below in place of the URL;
javascript:function post_Smby(params){var form = document.createElement("form"); form.setAttribute("method","post"); form.setAttribute("action","exportReport"); for(var key in params){var hiddenField = document.createElement("input"); hiddenField.setAttribute("type","hidden"); hiddenField.setAttribute("name",key); hiddenField.setAttribute("value",params[key]); form.appendChild(hiddenField);} document.body.appendChild(form);form.submit();}var rowcount=prompt("Amount of rows (10-50000):","1000"); hashes=unescape(location.hash).split("/"); date0=hashes[3].substr(hashes[3].indexOf(".date00")+8,8); date1=hashes[3].substr(hashes[3].indexOf(".date01")+8,8); post_Smby({'_.date00':date0, '_.date01':date1, 'explorer-table.rowStart':'0', 'explorer-table.rowCount':rowcount+'', 'id':hashes[1], 'ds':hashes[2], 'ef':'CSV', 'exportUrl':location.href});
Step 2 – Export 500+ from Google Analytics
- Navigate to the report you wish to export and select the appropriate date range;
- Click on your bookmark, a window will appear;
- Type how many rows you wish exported;
- Click OK and in a few moments you will have a CSV exported.
Notes:
This has been tested on a PC using IE9, Chrome 19 & Firefox 10 – No guarantees
David
June 28, 2012 9:50 amHi
This is excellent works like a dream. One question. Do you know how I would alter it to get the ecommerce stats?
sectionId%3Decommerce
Thanks
David
Sumobaby
June 28, 2012 5:36 pmHi David,
It should work using this same method if you visit a report in Conversions > E-commerce > [report name].
If you apply any custom segments or searches it may not export that view.
Tomek
Parthipan
July 30, 2012 10:47 amThis code allows us to download only the top 50,000 records.
My site has more than 2 lakhs rows how to download all those records.
Thanks,
Parthipan
Sumobaby
July 31, 2012 8:59 amIf you’re using the free version of Google Analytics, reports are limited to 50K rows sadly: https://www.google.com/analytics/premium/features.html
I see that you’re a SEO Specialist so I’ll assume you mean that you have over 2M rows of search referrals and am curious to what use you would make of downloading over 50K rows of search referral keywords?
I am not certain that any version of Excel permits over 1M rows in a spreadsheet should you have wished to analyse the data that way.
Nick
August 16, 2012 3:02 pmHi,
Great tip, very useful! Do you know if there is a way to edit the code to allow Multi-Channel Funnel path data to be downloaded? The current code returns the first 10 paths only :-(.
Thanks,
Nick
Sumobaby
August 18, 2012 11:49 amHi Nick,
I’ve tried and tested a solution that appears to work for Assisted Conversions and posted it https://www.sumobaby.net/news/2012/08/18/how-to-export-more-than-500-multi-channel-funnels-in-google-analytics/
Just copy the new JavaScript to a bookmark.
Let me know how you get on.
Vincent
October 12, 2012 6:55 amThis is not working for me. I got to Standard Reporting>>Traffic>>Search>>Overview
Then I clicked on the bookmark.
An excel file downloaded but it only contained dates and corresponding visits on that day. The file did not contain the search terms
Sumobaby
October 12, 2012 9:45 amHi Vincent,
The search overview report only contains 2 potential line items (rows), paid and organic search.
In your case you’ll need to visit traffic sources > sources > search > organic or paid.
This export method does not generate new or “expected” information, it does export the data that is visible on the report you’re viewing.
Let me know how you get on.
PRF
December 21, 2012 12:17 pmThis worked easier for me: https://support.google.com/analytics/bin/answer.py?hl=en&answer=1038573
Sumobaby
January 24, 2013 6:52 pmHi PRF,
Google’s post titled “Export and Email Reports” does indeed provide a simple solution to exporting greater than 500 rows. However if you ever try returning a 10,000+ rows report you’ll the memory consumption such that a browser will be unresponsive/sluggish at very best and mostly a browser will crash.
This solution enables those who wish to export more than a few thousand rows of a report.
kelltrill
February 21, 2013 11:54 amHi Sumobaby
Thanks so much for posting this solution. It’s by far the most effective one I’ve come across so far.
1 question though: At the moment when I export the resulting CSV only shows the primary dimension metric. If I’m also using a secondary dimension in GA (example: product category and product SKU in product performance report) then only the product category metric exports.
kelltrill
February 21, 2013 11:56 amHmm, scratch that. It seems to only export the immediate view without any alterations. In other words, only the Product metric, not any of the others.
Sumobaby
February 21, 2013 12:35 pmYes, sorry about that. From experience thus far if you apply any advanced segments it will still only call the original report.
I’ll update the post.
Are you able to achieve what you need by enabling the auto filter in the deader row in Excel?
Saquib
May 16, 2014 9:09 amI am unable to download 23000 rows. Please assist
Sumobaby
May 16, 2014 9:29 amWe can certainly try. Would you care to elaborate on the steps you’ve carried out and at which point you’re experiencing failure.